#include "ticker.h"
#include <QDebug>
#include <QTimerEvent>

Ticker::Ticker(int interval): counter(0)
{
    startTimer(interval);
}

void Ticker::timerEvent(QTimerEvent *te)
{
    if(counter > 10)
    {
        killTimer(te ->timerId());
        qDebug() << "Timer was killed";
    }
    else
    {
        qDebug() << counter++;
    }
}
